package com.pluto.cloud.example.service;

import com.pluto.cloud.example.domain.User;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * Created by Administrator on 2016/8/16.
 */
@Mapper
public interface UserMapper {

    @Select("select * from user where id = #{id}")
    User findById(@Param("id") int id);

    @Select("select * from user")
    List<User> findAll();

    @Insert("inser into user(name,age) values(#{name},#{age})")
    void saveUser(@Param("name") String name, @Param("age") int age);

}
